﻿/// <reference path="jquery.min.js" />
$(function () {
    $(".btn").click(function () {
        var u = $('input[name="u"]').val();
        var p = $('input[name="p"]').val();
        $.post("request.ashx", { cmd: "login", u: u, p: p }, function (data) {
            if (data == "ok") {
                $.cookie("username", u, { expires: 1, path: '/' });
                window.location.href = "peoplemgr.html";
            }
            else {
                alert("登录失败！");
            }
        });

    });
});
